﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;

namespace WaveMaster.Holidays.Club.Domain
{
    public enum MemberTypeEnum
    {
        Gold,
        Silver
    }

    public class MemberType
    {
        public long m_member_type_id = 0;
        public string m_member_type_code = string.Empty;
        public string m_member_type_name = string.Empty;
        public decimal m_price = 0;
        public decimal m_discount = 0;
        public string m_remarks = string.Empty;
        public DateTime m_cretnDate;
        public DateTime m_modfctnDate;
        public long m_cretnBy;
        public long m_modfctnBy;


        public MemberType() { }
        public MemberType(long id) { m_member_type_id = id; }
        public MemberType(MySqlDataReader rd)
        {
            m_member_type_id = Convert.ToInt64(rd["m_member_type_id"]);
            m_member_type_code = rd["m_member_type_code"].ToString();
            m_member_type_name = rd["m_member_type_name"].ToString();
            m_price = Convert.ToDecimal(rd["m_price"]);
            m_discount = Convert.ToDecimal(rd["m_discount"]);
            m_remarks = rd["m_remarks"].ToString();
            m_cretnDate = Convert.ToDateTime(rd["m_cretnDate"]);
            m_cretnBy = Convert.ToInt64(rd["m_cretnBy"]);
            m_modfctnDate = Convert.ToDateTime(rd["m_modfctnDate"]);
            m_modfctnBy = Convert.ToInt64(rd["m_modfctnBy"]);
        }
        public override string ToString()
        {
            return m_member_type_code;
        }
    }

}
